package map.android.baidu.carpool.data.impl;

import android.content.Context;
import map.android.baidu.carpool.WebConfig;
import map.android.baidu.carpool.data.CarpoolBaseData;
import map.android.baidu.carpool.response.DiscountAddResponse;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhangtongyu on 15/3/23.
 * main模块添加优惠券接口Request
 */
public class DiscountAddData extends CarpoolBaseData<DiscountAddResponse> {

    private String code; //优惠券兑换码，必传

    public void setCode(String code) {
        this.code = code;
    }

    public DiscountAddData(Context context) {
        super(context);
    }

    @Override
    protected String getUrl() {
        return WebConfig.getUrl(WebConfig.URL_ID_DISCOUNT_ADD);
    }

    @Override
    protected Map<String, String> getParams() {
        Map<String , String> params = new HashMap<String, String>();
        params.put("code" , code);

        return params;
    }
}
